package lovedna.service;
import lovedna.event.Event;
import lovedna.event.EventDispatcher;
import lovedna.event.IEventDispatcher;

/**
 * ...
 * @author liwei
 */

class Actor implements IEventDispatcher
{
	private static var _event:EventDispatcher=new EventDispatcher();
	public function new() 
	{
		
	}
	
	/* INTERFACE lovedna.event.IEventDispatcher */
	
	public function addEventListener(type:String, listener:Dynamic -> Void):Void 
	{
		_event.addEventListener(type, listener);
	}
	
	public function dispatchEvent(event:Event):Bool 
	{
		return _event.dispatchEvent(event);
	}
	
	public function hasEventListener(type:String, ?listener:Dynamic -> Void):Bool 
	{
		return _event.hasEventListener(type, listener);
	}
	
	public function removeEventListener(type:String, listener:Dynamic -> Void):Void 
	{
		_event.removeEventListener(type, listener);
	}
	
}